import request from "../request";

const roleApi = {
  getRoleData(parms) {
    return request({
      url: "/roleapi/getRoleData",
      method: "post",
      mock: false,
      data: parms,
    });
  },
  // 新增角色
  addRole(params) {
    return request({
      url: "/roleapi/addRole",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 修改角色
  updateRoleData(params) {
    return request({
      url: "/roleapi/updateRoleData",
      method: "post",
      mock: false,
      data: params,
    });
  },
  //删除角色
  deleteRole(params) {
    return request({
      url: "roleapi/deleteRole",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 批量删除角色
  batchDelRole(params) {
    return request({
      url: "/roleapi/batchDelRole",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 更改角色状态或密码
  changeRoleEnable(params) {
    return request({
      url: "/roleapi/changeRoleEnable",
      method: "get",
      mock: false,
      data: params,
    });
  },
  // 更改角色状态或密码
  updataRoleMenuScope(params) {
    return request({
      url: "/roleapi/updataRoleMenuScope",
      method: "post",
      mock: false,
      data: params,
    });
  },
  getRoleList(parms) {
    return request({
      url: "/roleapi/getRoleList",
      method: "get",
      mock: false,
      data: parms,
    });
  },
};
export default roleApi;
